<?php /* Smarty version Smarty-3.0-RC2, created on 2014-01-15 09:09:27
         compiled from "/home/k1961867/public_html/ptb/application/views/admin/pages/login.tpl" */ ?>
<?php /*%%SmartyHeaderCode:190987943252d650479b8b70-76409165%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '84019cfe11a76c4bff6faa501a1fe81ce082737f' => 
    array (
      0 => '/home/k1961867/public_html/ptb/application/views/admin/pages/login.tpl',
      1 => 1384440486,
    ),
  ),
  'nocache_hash' => '190987943252d650479b8b70-76409165',
  'function' => 
  array (
  ),
  'has_nocache_code' => false,
)); /*/%%SmartyHeaderCode%%*/?>
<?php $_template = new Smarty_Internal_Template("admin/site_header.tpl", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
 echo $_template->getRenderedTemplate();?><?php $_template->updateParentVariables(0);?><?php unset($_template);?>

<body id="login">
	<div class="box box-50 altbox">
		<div class="boxin">
			<div class="header">
				<h3>AMG - Web Administration Site</h3>
			</div>
			<form id="login_form" class="basic">
				<div class="inner-form">
					<div id="msg" class="msg msg-error hidden"><p><strong>message title</strong> message content</p></div>

					<dl style="margin:0 auto; width:80%;">
						<dt><label><b>User Name </b></label></dt>
						<dd><input id="username" class="txt mandatory" type="text" /></dd>

						
						<dt><label><b>Password </b></label></dt>
						<dd><input id="passwd" class="txt mandatory" type="password" /></dd>

						<dt>&nbsp;</dt>
						<dd><button id="btnlogin" class="button altbutton" type="button"/>Log In </botton></dd>
					</dl>
				</div>
			</form>
		</div>
	</div>
	
<script type="text/javascript">
$(document).ready(function(){
	$('#username').focus();
	$('#btnlogin').live( 'click', function() {
		//alert('login clicked');

		var _post = [{ name:'ts', value:new Date().getTime() }], _err  = 0;

		$('input', $('#login_form')).each(function () {
			var _val = $(this).val();
			if($(this).hasClass('mandatory') && ! _val) {
				_err=1;
				$(this).addClass('error');
			}
			_post.push({ name:this.id, value:_val });
		});

		if(_err) {
			$('#msg').removeClass('hidden').addClass('display').html('<p>field Harus di ISI..</p>');
		} else {
			$.post('<?php echo $_smarty_tpl->getVariable('site')->value['site'];?>
adminajax/login/', _post, function(response) {
				if (response=="0"){
					$('#msg').removeClass('hidden').addClass('display').html('<p>Invalid Username / Password !!</p>');
				} else if (response=="1"){
					$('#msg').removeClass('hidden').addClass('display').html('<p>User anda belum aktif !!</p>');
				} else {
					top.location.href = response;
				}
			});
		}
	});
});
</script>
</body>
<?php $_template = new Smarty_Internal_Template("admin/site_footer.tpl", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
 echo $_template->getRenderedTemplate();?><?php $_template->updateParentVariables(0);?><?php unset($_template);?>